<html>
<body bgcolor="#000000" text="#FFFFFF" link="#CCCCCC">
<body bgcolor="#000000" text="#FFFFFF">
<?
include("config.php");
$query = 'SELECT TOP 100  Name, Class, clevel,Strength,Energy,Dexterity,Vitality from Character where Class=33 and CtlCode < 1 order by cLevel desc';
$result = mssql_query( $query );
?>

<table width="450" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#000000">
  <!--DWLayoutTable-->
  <tr>
    <td width="450" height="474" valign="top"><div align="center" class="style3"><strong><font size="4">Ranking
          de  Muse Elfs<br>
          <br>
    </font></strong></div>      
      <table width="100" height="130" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#000000">
        <!--DWLayoutTable-->
      <tr>
        <td align="center" valign="middle" bgcolor="#000000"><table width="450" border="1" cellpadding="0" cellspacing="1" bordercolor="#000000" bgcolor="#000000">
          <tr>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Nş</strong></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Nome</strong></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Classe</strong></span></div>
            </td>
            <td background="img/anuncio.JPG" bgcolor="#000000"><div align="center"><span class="style4"><font color="#FFFFFF"><strong>Level</strong></font></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Força</strong></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Energia</strong></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Agilidade</strong></span></div>
            </td>
            <td background="img/anuncio.JPG"><div align="center"><span class="style4"><strong>Vitalidade</strong></span></div>
            </td>
          </tr>
          <?
		for($i=0;$i < mssql_num_rows($result);++$i)
			{
			$row = mssql_fetch_row($result);
			$rank = $i+1;
			if($row[1] == 0){ $row[1] =  'DW';
			}
			if($row[1] == 1){ $row[1] =  'SM';
			}
			if($row[1] == 16){ $row[1] =  'DK';
			}
			if($row[1] == 17){ $row[1] =  'BK';
			}
			if($row[1] == 32){ $row[1] =  'Elf';
			}
			if($row[1] == 33){ $row[1] =  'ME';
			}
			if($row[1] == 48){ $row[1] =  'MG';
			}
			if($row[1] == 64){ $row[1] =  'DL';
			}
			echo "<tr>
			  <td valign=top align=left bgcolor=#000000 class=style1>$rank</td>
              <td valign=top align=left bgcolor=#000000 class=style1>$row[0]</td>
              <td valign=top align=left bgcolor=#000000 class=style1>$row[1]</td>
              <td valign=top align=left bgcolor=#000000 class=style1>$row[2]</td>
			  <td valign=top align=left bgcolor=#000000 class=style1>$row[3]</td>
			  <td valign=top align=left bgcolor=#000000 class=style1>$row[4]</td>
			  <td valign=top align=left bgcolor=#000000 class=style1>$row[5]</td>
			  <td valign=top align=left bgcolor=#000000 class=style1>$row[6]</td>
              </tr>";
			}
		?>
        </table>          <br>
          <input name="Button" type="button" class="campos" value="Atualizar" onClick="javascript:window.location='rankme.php'"></td>
      </tr>
      <tr>
        <td height="55" bgcolor="#000000"><div align="center"><strong><font size="4"><a href="rankings.php" target="menu">&lt;&lt;Voltar</a></font></strong></div></td>
      </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>